#include "helpers.hpp"

void detectAndDrawFace(cv::Mat &img, cv::CascadeClassifier &face_cascade)
{
    cv::Mat grayFrame;
    cv::cvtColor(img, grayFrame, cv::COLOR_BGR2GRAY);
    
    std::vector<cv::Rect> faces;
    face_cascade.detectMultiScale(grayFrame, faces, 1.1, 6, 0 | cv::CASCADE_SCALE_IMAGE, cv::Size(30, 30));
    
    for (const auto &face : faces)
    {
        cv::rectangle(img, face, cv::Scalar(0, 255, 0), 2);
    }
}
